package com.ncsc.lmis.model;
// Generated Feb 25, 2014 11:44:39 PM by Hibernate Tools 3.4.0.CR1


import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * AccAccountPeriod generated by hbm2java
 */
@Entity
@Table(name="acc_account_period"
    ,catalog="lmis"
)
public class AccAccountPeriod  implements java.io.Serializable {


     private Short accPeriodNo;
     private String accPeriodName;
     private Short accPeriodYear;
     private Date accPeriodBeginDate;
     private Date accPeriodEndDate;
     private Short accPeriodIsActive;
     private Set<AccAccountPeriodMonth> accAccountPeriodMonths = new HashSet<AccAccountPeriodMonth>(0);

    public AccAccountPeriod() {
    }

    public AccAccountPeriod(String accPeriodName, Short accPeriodYear, Date accPeriodBeginDate, Date accPeriodEndDate, Short accPeriodIsActive, Set<AccAccountPeriodMonth> accAccountPeriodMonths) {
       this.accPeriodName = accPeriodName;
       this.accPeriodYear = accPeriodYear;
       this.accPeriodBeginDate = accPeriodBeginDate;
       this.accPeriodEndDate = accPeriodEndDate;
       this.accPeriodIsActive = accPeriodIsActive;
       this.accAccountPeriodMonths = accAccountPeriodMonths;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)

    
    @Column(name="ACC_PERIOD_NO", unique=true, nullable=false)
    public Short getAccPeriodNo() {
        return this.accPeriodNo;
    }
    
    public void setAccPeriodNo(Short accPeriodNo) {
        this.accPeriodNo = accPeriodNo;
    }

    
    @Column(name="ACC_PERIOD_NAME", length=50)
    public String getAccPeriodName() {
        return this.accPeriodName;
    }
    
    public void setAccPeriodName(String accPeriodName) {
        this.accPeriodName = accPeriodName;
    }

    
    @Column(name="ACC_PERIOD_YEAR")
    public Short getAccPeriodYear() {
        return this.accPeriodYear;
    }
    
    public void setAccPeriodYear(Short accPeriodYear) {
        this.accPeriodYear = accPeriodYear;
    }

    @Temporal(TemporalType.DATE)
    @Column(name="ACC_PERIOD_BEGIN_DATE", length=10)
    public Date getAccPeriodBeginDate() {
        return this.accPeriodBeginDate;
    }
    
    public void setAccPeriodBeginDate(Date accPeriodBeginDate) {
        this.accPeriodBeginDate = accPeriodBeginDate;
    }

    @Temporal(TemporalType.DATE)
    @Column(name="ACC_PERIOD_END_DATE", length=10)
    public Date getAccPeriodEndDate() {
        return this.accPeriodEndDate;
    }
    
    public void setAccPeriodEndDate(Date accPeriodEndDate) {
        this.accPeriodEndDate = accPeriodEndDate;
    }

    
    @Column(name="ACC_PERIOD_IS_ACTIVE")
    public Short getAccPeriodIsActive() {
        return this.accPeriodIsActive;
    }
    
    public void setAccPeriodIsActive(Short accPeriodIsActive) {
        this.accPeriodIsActive = accPeriodIsActive;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="accAccountPeriod")
    public Set<AccAccountPeriodMonth> getAccAccountPeriodMonths() {
        return this.accAccountPeriodMonths;
    }
    
    public void setAccAccountPeriodMonths(Set<AccAccountPeriodMonth> accAccountPeriodMonths) {
        this.accAccountPeriodMonths = accAccountPeriodMonths;
    }




}


